<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<title>绑定银行卡</title>
<link href="Style/Common.css" rel="stylesheet">
<link href="Style/Employ.css" rel="stylesheet">
<script src="Js/jquery.min.js" type="text/javascript"></script>
<script src="Js/Banner.js" type="text/javascript"></script>
</head>

<body>
 <div class="Header">  
  <p>绑定银行卡</p>
  <span onclick="location.href = 'MyMoney.html';"><img src="Images/Return.png"></span>
  <a href="javascript:save()">保存</a>
 </div><!--Header end-->
 <ul class="EnterId" style="width:96%;padding:0 2%;background:#fff;overflow:hidden;">  
  <li>   
   <span>开&nbsp;&nbsp;户&nbsp;&nbsp;行</span>
   <select class="Sizing" id="Bank"><option>工商银行</option><option>建设银行</option><option>农业银行</option><option>中国银行</option></select>
  </li>
  <li>
   <span>省</span>
   <select class="Sizing" id="Province"><option>广东</option></select>
  </li>
  <li>
   <span>市</span>
   <select class="Sizing" id="City"><option>深圳</option></select>
   <img src="Images/GrayRight.png">
  </li> 
  <li>
   <span>支行</span>
   <input class="Sizing" id="Branch">
  </li>
  <li>
   <span>账户</span>
   <input class="Sizing" id="Account">
  </li>
  <li>
   <span>真实姓名</span>
   <input class="Sizing" id="Name">
  </li> 
 </ul>
 <input type="button" class="SubmitBtn" value="保存">
 <div class="MenuBar" id="menuDiv">
 </div><!--MenuBar end--> 
</body>
</html>
<script src="Js/common.js" type="text/javascript"></script>
<script src="Js/user.js" type="text/javascript"></script>
<script type="text/javascript">
  $(".SubmitBtn").click(function(){
    save()
  });
  function save(){
    var bank = $('#Bank').val();
    var province = $('#Province').val();
    var city = $('#City').val();
    var branch = $('#Branch').val();
    var account = $('#Account').val();
    var name = $('#Name').val();

    $.ajax({
        type: "post",
        url: "/ServiceInterface/MyBankAndMoney.ashx",
        data: { flag: "addbank",
            TrueName: name,
            CardNumber: account,
            BankName: bank,
            BankDetailAddress: branch
            //           BandkAdressCode: ,
            //           BandkAdressCodeName: 
        },
        dataType: "text",
        async: false,
        success: function (data) {
            if (data == '1') {
                alert('保存成功');
                location.href = "MyCard.html"
            } else {
                alert(data);
            }
         }
    });
  }
</script>
